<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>onload</title>
    <script>
        function mymessage() {
            alert("消息在 onload 事件触发后弹出。");
        }
    </script>
</head>

<!-- 当页面完成加载时，显示一个提示框。 -->

<body onload="mymessage()"></body>

</html>